package com.danny.login

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import kotlinx.android.synthetic.main.fragment_user.view.*

class UserFragment: Fragment() {
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        var view = inflater!!.inflate(R.layout.fragment_user,container,false)
        view.tv_user_name.text = if (AccountUtils.userInfo == null) "用户未登录" else "登录用户：${AccountUtils.userInfo!!.userName}"
        return view
    }
}